package com.guochenglang.www.dao;

import com.guochenglang.www.pojo.LikeMessage;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author GuoChenglang
 */
public interface LikeMessageDao {
    /**
     * 获得点赞信息
     *
     * @param conditions 获得点赞信息的条件
     * @return 点赞信息列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    ArrayList<LikeMessage> likeMessageSelect(LikeMessage conditions) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 添加点赞信息
     *
     * @param comfort 添加信息
     * @return 添加的键
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int insertLikeMessage(LikeMessage comfort) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 删除点赞消息
     *
     * @param conditions 删除条件
     * @return 删除行数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int deleteLikeMessage(LikeMessage conditions) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 更新点赞消息
     *
     * @param set        更新数据
     * @param conditions 更新条件
     * @return 更新行数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int updateLikeMessage(LikeMessage set, LikeMessage conditions) throws SQLException, InterruptedException, IllegalAccessException;
}
